Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

login_as only accepts a fixture symbol

#43

I tend to favor factories and datasets over fixtures, but getting rid of the user fixtures generally means a lot of work in the boilerplate restful_auth tests.

As one step in the right direction, I made a small tweak to login_as. If you pass a user model (or whatever model you chose to authenticate) it will use that instead of looking for a fixture. I've attached the git diff patch to this ticket.

This makes divorcing fixtures in restful_auth possible. I've also thought about making it downright pleasant by modifying the TestUnit functional tests to be more fixture-agnostic. My first thought is to limit the fixture calls (ie, users(:quentin) down to just once in the setup method. That way, a developer could change:

def setup @user = users(:quentin) end

to:

def setup @user = Factory.create(:user) end

at the top of tests and most, if not all, of the change is done. Feedback on this idea would be appreciated.

Reported by Jaime Bellmyer · February 14th, 2009 @ 02:33 PM

State: new
Milestone: none
Assigned to: mrflip mrflip

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.